table of contents
GIO(1) | User Commands | GIO(1) |
NAME¶
gio - GIO commandline tool
SYNOPSIS¶
gio help [COMMAND]
gio version
gio cat LOCATION...
gio copy [OPTION...] SOURCE... DESTINATION
gio info [OPTION...] LOCATION...
gio list [OPTION...] [LOCATION...]
gio mime MIMETYPE [HANDLER]
gio mkdir [OPTION...] LOCATION...
gio monitor [OPTION...] [LOCATION...]
gio mount [OPTION...] [LOCATION...]
gio move [OPTION...] SOURCE... DESTINATION
gio open LOCATION...
gio rename LOCATION NAME
gio remove [OPTION...] LOCATION...
gio save [OPTION...] DESTINATION
gio set [OPTION...] LOCATION ATTRIBUTE VALUE...
gio trash [OPTION...] [LOCATION...]
gio tree [OPTION...] [LOCATION...]
DESCRIPTION¶
gio is a utility that makes many of the GIO features available from the commandline. In doing so, it provides commands that are similar to traditional utilities, but let you use GIO locations instead of local files: for example you can use something like smb://server/resource/file.txt as location.
COMMANDS¶
help [COMMAND]
version
cat LOCATION...
The cat command works just like the traditional cat utility.
Note: just pipe through cat if you need its formatting options like -n, -T or other.
copy [OPTION...] SOURCE... DESTINATION
The copy command is similar to the traditional cp utility.
Options
-T, --no-target-directory
-p, --progress
-i, --interactive
--preserve
-b, --backup
-P, --no-dereference
info [OPTION...] LOCATION...
The info command is similar to the traditional ls utility.
Options
-w, --query-writable
-f, --filesystem
-a --attributes=ATTRIBUTES
Attributes can be specified with their GIO name, e.g. standard::icon, or just by namespace, e.g. unix, or by '*', which matches all attributes. Several attributes or groups of attributes can be specified, separated by comma.
By default, all attributes are listed.
-n, --nofollow-symlinks
list [OPTION...] [LOCATION...]
The list command is similar to the traditional ls utility.
Options
-a --attributes=ATTRIBUTES
Attributes can be specified with their GIO name, e.g. standard::icon, or just by namespace, e.g. unix, or by '*', which matches all attributes. Several attributes or groups of attributes can be specified, separated by comma.
By default, all attributes are listed.
-h, --hidden
-l, --long
-n, --nofollow-symlinks
-u, --print-uris
mime MIMETYPE [HANDLER]
Handlers must be specified by their desktop file name, including the extension. Example: org.gnome.gedit.desktop.
mkdir [OPTION...] LOCATION...
The mkdir command is similar to the traditional mkdir utility.
Options
-p, --parent
monitor [OPTION...] [LOCATION...]
The monitor command uses the GIO file monitoring APIs to do its job. GIO has different implementations for different platforms. The most common implementation on Linux uses inotify.
Options
-d, --dir=LOCATION
-f, --file=LOCATION
-D, --direct=LOCATION
-s, --silent=LOCATION
-n, --no-moves
-m, --mounts
mount [OPTION...] [LOCATION...]
Mounting refers to the traditional concept of arranging multiple file systems and devices in a single tree, rooted at /. Classical mounting happens in the kernel and is controlle by the mount utility. GIO expands this concept by introducing mount daemons that can make file systems available to GIO applications without kernel involvement.
GIO mounts can require authentication, and the mount command may ask for user IDs, passwords, and so on, when required.
Options
-m, --mountable
-d, --device=DEVICE
-u, --unmount
-e, --eject
-s, --unmount-scheme=SCHEME
-f, --force
-a, --anonymous
-l, --list
-o, --monitor
-i, --detail
move [OPTION...] SOURCE... DESTINATION
The move command is similar to the traditional mv utility.
open LOCATION...
GIO obtains this information from the shared-mime-info database, with per-user overrides stored in $XDG_DATA_HOME/applications/mimeapps.list.
The mime command can be used to change the default handler for a mimetype.
rename LOCATION NAME
The rename command is similar to the traditional rename utility.
remove [OPTION...] LOCATION...
This command removes files irreversibly. If you want a reversible way to remove files, see the trash command.
Note that not all URI schemes that are supported by GIO may allow deletion of files.
The remove command is similar to the traditional rm utility.
Options
-f, --force
save [OPTION...] DESTINATION
This is similar to just redirecting output to a file using traditional shell syntax, but the save command allows saving to location that GIO can write to.
Options
-b, --backup
-c, --create
-a, --append
-p, --private
-u, --unlink
-v, --print-etag
-e, --etag=ETAG
set LOCATION ATTRIBUTE VALUE...
File attributes can be specified with their GIO name, e.g standard::icon. Note that not all GIO file attributes are writable. Use the --query-writable option of the info command to list writable file attributes.
If the TYPE is unset, VALUE does not have to be specified. If the type is stringv, multiple values can be given.
Options
-t, --type=TYPE
If the type is not specified, string is assumed.
-n, --nofollow-symlinks
trash [OPTION...] [LOCATION...]
Note that moving files to the trash does not free up space on the file system until the "Trashcan" is emptied. If you are interested in deleting a file irreversibly, see the remove command.
Inspecting and emptying the "Trashcan" is normally supported by graphical file managers such as nautilus, but you can also see the trash with the command: gio list trash://.
Options
-f, --force
--empty
tree [OPTION...] [LOCATION...]
The tree command is similar to the traditional tree utility.
Options
-h, --hidden
-l, --follow-symlinks
EXIT STATUS¶
On success 0 is returned, a non-zero failure code otherwise.
SEE ALSO¶
GIO |